package cn.com.zcode.auth.service;

import java.util.List;

import cn.com.zcode.auth.dao.AuthDao;
import cn.com.zcode.auth.model.Resource;
import cn.com.zcode.auth.model.UserRole;
import cn.com.zcode.core.service.BaseServiceSupport;

public class AuthServiceImpl extends BaseServiceSupport<AuthDao> implements AuthService{

 
	@Override
	public List<Resource> findAllResource() {
		return this.mainDao.findAll(Resource.class);
	}

	@Override
	public List<UserRole> findRoles(String username) {
		
		return this.mainDao.findRoles(username);
	}


	@Override
	public Resource saveResource(Resource resource) {
		return this.mainDao.save(resource);
	}

	@Override
	public UserRole saveRole(UserRole role) {
		return this.mainDao.save(role);
	}

}
